package org.arch_learn.rpc.consumer.service.impl;

import org.arch_learn.rpc.consumer.service.UserService;
import org.arch_learn.rpc.nz_rpc.annos.RpcReference;
import org.arch_learn.rpc.nz_rpc_api.pojo.User;
import org.arch_learn.rpc.nz_rpc_api.service.IUserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @RpcReference
    private IUserService iUserService;

    @Override
    public User selectUserById(Integer id) {
        return iUserService.findById(id);
    }

    @Override
    public void addUser(User user) {
        iUserService.addUser(user);
    }
}
